package com.bblocks.auth.pojo;

public enum CommonReturnCode{
    //成功
    SUCCESS(1, "操作成功"),

    //异常
    ERROR(0, "操作失败"),//业务异常
    UNKNOWN_ERROR(-1, "未知错误"),//系统异常

    //参数错误
    PARAMS_IS_NULL(10001,"参数为空"),
    PARAMS_NOT_COMPLETE(10002,"参数不全"),
    PARAMS_TYPE_ERROR(10003,"参数类型错误"),
    PARAMS_IS_INVALID(10004,"参数无效"),

    //用户
    LOGIN_ERROR(20000, "登陆异常"),
    NOT_LOGIN(20001, "请先登录平台用户"),
    NOT_USER(20002, "该用户未注册"),
    USER_EXIST (20003, "用户已存在"),
    USER_FORBIDDEN (20004, "该用户已被禁用,联系管理员解除"),
    NOT_REAL(20005, "用户未实名认证"),
    NOT_AGENT(20006, "用户并非经纪人"),
    NOT_REALBUSINESS(20007, "用户未认证商家端"),
    NOT_COMPANY(20008, "公司未审核通过"),
    NO_PASSWORD(20009, "密码不正确"),
    JIGUANG_ERROR(20010, "极光注册异常"),
    BIND_ERROR(20011, "该手机号已绑定微信"),

    //数据
    NOT_DATA(30001, "数据不存在"),
    DATA_IS_WRONG(30002,"数据有误"),
    DATA_ALREADY_EXISTED(30003, "数据已存在"),
    DATA_VIOLATION(30004, "数据违规"),

    //权限错误
    PERMISSION_DENIED(40001, "权限不足"),

    //上传异常
    UPLOAD_ERROR(50001, "上传文件异常"),
    UPLOAD_EMPTY(50002, "上传文件为空"),

    //验证码
    IDENTIFYING_CODE_ERREO(60001, "验证码错误"),
    IDENTIFYING_CODE_TIMEOUT(60002, "验证码超时"),


    COMMUNICATION_ERROR(70002, "通讯异常"),
    ;

    private Integer code;
    private String message;

    CommonReturnCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
